package edu.biwu.service.impl;

import edu.biwu.dao.ProductDao;
import edu.biwu.po.Product;
import edu.biwu.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 王俊彪
 * @version 1.0
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Resource(name = "productDaoImpl1")
    private ProductDao productDao;

    @Override
    public void updateProduct(Product product) {
        productDao.updateProduct(product);
    }

    @Override
    public List<Product> findAll() {
        return productDao.findAll();
    }

    public void setProductDao(ProductDao productDao) {
        this.productDao = productDao;
    }
}
